<html>
	<head>
		<title>MESS in a browser!</title>
<script type='text/javascript' src='modernizr-custom.js'></script>
<script type='text/javascript'>
Modernizr.addTest('typedarray', function(){
  return (window.Float64Array != undefined);
});
Modernizr.addTest('mozsetup', function(){
  if (Modernizr.audiodata) {
    var audio = new Audio();
    return (typeof(audio['mozSetup']) === 'function');
  } else {
    return false;
  };
});
Modernizr.load({
	test: Modernizr.canvas && Modernizr.typedarray,
	yep : [
		'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js',
		'jquery.url.js',
		'messloader.js',
		'webaudio.js'
	],
	nope : 'messfail.js'
});
</script>
</head>
<body>
	<h1 style="text-align: center;">MESS in a browser!</h1>
	<div id='canvasholder' style="text-align: center;">
	</div>
	<div><a href="javascript:void(0);" id="gofullscreen">Fullscreen</a></div>
	<div><a href="javascript:JSMESS.ui_set_show_fps(JSMESS.get_ui(), !JSMESS.ui_get_show_fps(JSMESS.get_ui()));">Toggle MESS performance indicator</a></div>
	<div>MESS: <a href="javascript:JSMESS.sound_manager_mute(JSMESS.get_sound(), 1, 2);">Turn volume down</a> - <a href="javascript:JSMESS.sound_manager_mute(JSMESS.get_sound(), 0, 2);">Turn volume back up</a></div>
	<div>Emscripten: <a href="javascript:JSMESS.sdl_pauseaudio(1);">Mute audio</a> - <a href="javascript:JSMESS.sdl_pauseaudio(0);">Unmute audio</a> (Chrome/latest Firefox only)</div>

	<div id='status' style="display:block;"></div>
	<div id='output' style="display:block;"></div>
</body>
</html>

